package com.vanke.kotlin_mvp.util

import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager

/**
 * @name Kotlin_MVP
 * @package name：com.vanke.kotlin_mvp
 * @class describe
 * @anthor shiyuchuan
 * @time 2017/8/16 11:06
 */

object ActivityUtils {

    fun addFragmentToActivity(fragmentManager: FragmentManager, fragment: Fragment, frameId: Int) {
        val beginTransaction = fragmentManager.beginTransaction()
        beginTransaction.add(frameId, fragment)
        beginTransaction.commit()
    }

}